using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Enemy_AttackState : EnemyStateBase
{
    public Enemy_AttackState(Enemy enemy, StateMachine stateMachine, string animName) : base(enemy, stateMachine, animName)
    {

    }
    public override void Enter()
    {
        base.Enter();
        //设置攻击速度
        SyncAttackSpeed();
        enemy.SetVelocity(0, rb.velocity.y);
    }
    public override void Update()
    {
        base.Update();
        if (triggerCalled)
        {
            stateMachine.ChangeState(enemy.battleState);
        }
    }
    public override void Exit()
    {
        base.Exit();
    }
}
